<?php

?>
<!-- layout::Admin:iframe/header::$tpl_cache_date -->

<!-- Start Page Header -->
<div id="page-header">
    <h1><?=$title?></h1>
</div>
<!-- End Page Header -->

<!-- Start Grid -->
<div class="container_12">

<div id="message_block"></div>

<!-- Start Forms -->
<div class="grid_12">
  <div class="box-header"> 会员资料 </div>
  <div class="box">
    <form method="post" id="edit_form">
      <div class="row">
        <label>用户名</label>
        <input type="text" name="name" id="formid_name" value="<?=$val['name']?>" />
      </div>
      <div class="row">
        <label>密码</label>
        <input type="password" name="password" id="formid_password" />
      </div>
      <div class="row">
        <label>Email</label>
        <input type="text" name="email" id="formid_email" value="<?=$val['email']?>" />
      </div>
      <div class="row">
        <label>角色</label>
        <select name="role" id="formid_role">
            <?=$role_list?>
        </select>
      </div>
      <div class="row">
        <label>备注信息</label>
        <textarea name="text area" rows="6" cols="34"><?=$val['note']?></textarea>
      </div>
      <!-- 不可修改 -->
      <div class="row">
        <label>注册时间</label>
        <?=togmdate($val['regdate'])?>
      </div>
      <div class="row">
        <label>注册IP</label>
        <?=$val['regip']?>
      </div>
      <div class="row">
        <label>最后登录时间</label>
        <?=togmdate($val['logindate'])?>
      </div>
      <div class="row">
        <label>最后登录IP</label>
        <?=$val['loginip']?>
      </div>
      <div class="row">
        <label></label>
        <input type="submit" value="修改" class="button" />
        <input type="reset" value="重置" class="button" />
      </div>
    </form>
  </div>
</div>
<!-- Start Forms -->

<!-- End Grid -->
</div>
<!-- End Page Content -->

<script type="text/javascript">
    $("#edit_form").submit(function(){
        var name     = $("#formid_name").val();
        var password = $("#formid_password").val();
        var email    = $("#formid_email").val();

        /* 表单验证 */
        if(name == '') {
           return msg('用户名不能为空!', 'error', '#formid_name');
        } else if(password == '') {
            return msg('密码不能为空!', 'error', '#formid_password');
        } else if(email == '') {
            return msg('Email 不能为空!', 'error', '#formid_email');
        } else {
            $("#message_block").empty();
        }
        return true;
    });
</script>

<!-- layout::Admin:iframe/footer::$tpl_cache_date -->